package com.gome.boot.config.elasticsearch.search;

import java.io.Serializable;

/**
 * ES索引数据查询分页结果对象.
 *
 * @author baoxiufeng
 */
public class Pager implements Serializable {

    /** 默认当前页 */
    private static final int CURRENT_PAGE = 1;
    /** 默认每页条目数 */
    private static final int PAGE_SIZE = 10;

    /**
     * 当前页
     */
    private int currentPage;
    /**
     * 每页条目数
     */
    private int pageSize;
    /**
     * 总页数
     */
    private int totalPage;
    /**
     * 总条目数
     */
    private int totalSize;

    /**
     * 默认构造方法.
     */
    public Pager() {
        this(CURRENT_PAGE, PAGE_SIZE);
    }

    /**
     * 构造方法.
     *
     * @param currentPage 当前页
     * @param pageSize 每页条目数
     */
    public Pager(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }
}
